Skip to content

Optimize array unshift#5076

Open
yush-1018 wants to merge 1 commit intoboa-dev:mainfrom
yush-1018:optimize-array-unshift
Open

Optimize array unshift#5076
yush-1018 wants to merge 1 commit intoboa-dev:mainfrom
yush-1018:optimize-array-unshift

Conversation

@yush-1018
Copy link
Contributor

Add dense array fast-path for Array.prototype.unshift, same as the existing one in [shift]

Partially addresses #3407.

@yush-1018 yush-1018 requested a review from a team as a code owner March 14, 2026 21:00
@github-actions github-actions bot added this to the v1.0.0 milestone Mar 14, 2026
@github-actions
Copy link

github-actions bot commented Mar 14, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 50,070 50,068 -2
Ignored 2,072 2,072 0
Failed 821 823 +2
Panics 0 0 0
Conformance 94.54% 94.53% -0.00%
Broken tests (2):
test/built-ins/Array/prototype/unshift/set-length-array-length-is-non-writable.js (previously Passed)
test/built-ins/Array/prototype/unshift/set-length-array-is-frozen.js (previously Passed)

Tested main commit: 3016f492d02a06033e11269fdcef603d293222c4
Tested PR commit: e650ab26e123e79ae1eef7179dc51469ee1f0ca1
Compare commits: 3016f49...e650ab2

@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.10%. Comparing base (6ddc2b4) to head (e650ab2).
⚠️ Report is 855 commits behind head on main.

Files with missing lines Patch % Lines
core/engine/src/builtins/array/mod.rs 50.00% 14 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5076       +/-   ##
===========================================
+ Coverage   47.24%   59.10%   +11.85%     
===========================================
  Files         476      563       +87     
  Lines       46892    62693    +15801     
===========================================
+ Hits        22154    37054    +14900     
- Misses      24738    25639      +901     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jedel1043 jedel1043 added Waiting On Review Waiting on reviews from the maintainers and removed waiting-for-review labels Mar 15, 2026
@yush-1018 yush-1018 force-pushed the optimize-array-unshift branch from dfc891b to 737a1fd Compare March 15, 2026 07:00
@github-actions github-actions bot added the C-Builtins PRs and Issues related to builtins/intrinsics label Mar 15, 2026
@yush-1018 yush-1018 force-pushed the optimize-array-unshift branch from 737a1fd to e650ab2 Compare March 15, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Builtins PRs and Issues related to builtins/intrinsics Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants